<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="JavaScript1.2" src="e_stm31.js"></script>
</head>

<body bgcolor="#FFFF99" topmargin="4">
<script type="text/javascript" language="JavaScript1.2" src="e_menu_cnt.js"></script>
<?php @error_reporting (E_ALL ^ E_NOTICE);

/**
 * 
 * PHP Photo Gallery
 * 
 * Copyright 2003 Dave Tufts <http://davetufts.com>
 * 
 * @version:      2.0
 * @last_update:  2003-11-06
 * @description:  Simple, easy to use online image gallery
 * @requires:	  PHP 4.1 or higher
 * 
 * @changes:      v2.0  - Added function to read all files in image directory, added variable check to work with Error Notice reporting
 * @changes:      v1.0  - Initial release
 * 
 * 
 */



/* --------------------------------------------------------------- *
 * USER SETTINGS
 * --------------------------------------------------------------- */

	/* 
	** PAGE TITLE (text string)
	**
	** will appear at the top of the page
	**
	**/
	$page_title    = "My Photos";
	
	
	/*
	** LEFT CONTENT (text string)
	**
	** Link, description, graphic, etc - will appear in upper left
	**
	**/
	$left_content  = "<a href=\"http://dave.imarc.net/php/\">My Home Page</a>";
	
	
	/*
	** RIGHT CONTENT (text string)
	**
	** Link, description, graphic, etc - will appear in upper right
	**
	**/
	$right_content = "";
	
		
	/*
	** IMAGE SOURCE (text string)
	**
	** VIRTUAL PATH to the photo gallery images - NO trailing slash
	** Images in this directory must be GIF and JPG files with lowercase '.gif' or '.jpg' extensions
	**
	*/
	$image_dir     = "prispevki/skabrijel/images";
	
	
	/*
	** NEXT PHOTO (text string)
	**
	** Defines what will be used as the "Next Photo". Can be image or text
	** $next_photo = "Next"; will suffice, or get fancy with a custom graphic (and img tag)
	**
	*/
	$next_photo    = "> > >";
	
	
	/* USE_GIFS (bool)
	**
	** If 'use_gifs' is set to 'TRUE', thumnail images will be displayed
	** below the large JPEG image
	**
	** NOTE: Except for their extension, gif files must be named IDENTICAL to JPGs.
	*/
	$use_gifs      = true;
	
	
	/*
	** COLUMNS (integer)
	**
	** below the large photo, is a grid of all other images in the photo
	** gallery - $columns defines how many columns this grid will have
	**
	*/
	$columns       = 5;
	
	
	/* 
	** IMAGES (array)   [OPTIONAL]
	**
	** Array of all image names in the photo gallery. For each
	** item in this array, there should be a jpg and - if $use_gifs is true
	** above - a gif.
	** 
	** There are a couple ways to do this...
	** 
	** [1] Manually create an array (without extensions)
	**     This is the least amount of work for PHP, and a little more work for you:
	** 			$image = array( "image_1", "image_2", "image_3");
	**
	** [2] Manually create an array by copying contents of the directory
	**     A little more work for PHP, easier for you:
	** 			$image = array(	"image_1.gif", "image_1.jpg", 
	** 							"image_2.gif", "image_2.jpg", 
	** 							"image_3.gif", "image_3.jpg");
	**
	** [3] Automatically read your image directory
	** 	   Most work for PHP - easiest for you:
	**			LEAVE $image undefined (comment it out or delete it)
	**
	** Gif and jpg files must be named with ".gif" and ".jpg" extenstion (with lower case extenstion names)
	**
	**/
	
	//$image = array( "image_1", "image_2", "image_3");





/* --------------------------------------------------------------- *
 * DO NOT EDIT BELOW THIS LINE
 * --------------------------------------------------------------- */	
	
	
	if (!headers_sent()) {
		print("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n");
		print("  \"http://www.w3.org/TR/html4/loose.dtd\">\n");
		print("<html>\n");
		print("<head>\n");
		print("  <meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\">\n");
		print("  <title>PHP Photo Gallery</title>\n");
		print("</head>\n");
		print("<body>\n");
		$print_footer = TRUE;
	} else {
		$print_footer = FALSE;
	}



	/* --------------------------------------------------------------- *
	 * SETUP, DEFAULTS, and CHECK SETTINGS
	 * --------------------------------------------------------------- */
	$view       = (isset($_REQUEST['view'])) ? $_REQUEST['view'] : "";
	
	// Check Setup
	if (!isset($image_dir) || !$image_dir) {
		die("Setup Error:<br>The variable <b>\$image_dir</b> (in the 'USER SETTING' section) is not set.");
	}
	if (($image_dir[strlen($image_dir) - 1] == "/") || ($image_dir[strlen($image_dir) - 1] == "\\")) {
		die("Setup Error:<br>The variable <b>\$image_dir</b> (in the 'USER SETTING' section) should <b>not</b> end with a slash");
	}
	if (!is_dir($image_dir)) {
		die("Setup Error:<br>The variable <b>\$image_dir</b> (in the 'USER SETTING' section) must be a directory.");
	}
	
	// Read all files in $image_dir
	if (!isset($image)) {
		$image = phppg_recursive_listdir($image_dir);
	} else {
		array_walk ($image, 'phppg_add_image_dir');
	}
	
	if (!is_array($image) || !count($image)) {
		die("Setup Error:<br>There are no files in the image directory. You specify this direcory in the 'USER SETTINGS' secion as \$image_dir.");
	}
	
	// SECURITY CHECK 
	// Requested $view must contain the REAL PATH of '$image_dir'
	if ($view) {
		$image_dir_path = realpath($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . "/" . $image_dir); // REALPATH to user specified image directory
		$view_dir_path  = dirname(realpath($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . "/" . $view . ".jpg")); // REALPATH to the file we're supposed to be viewing
		if (!$image_dir_path || !$view_dir_path || !stristr($view_dir_path, $image_dir_path)) {
			die("BAD REQUEST<br>Please <a href=\"" . $_SERVER['PHP_SELF'] . "\">go back</a> and request another image");
		}
	}
	
	// Remove ".gif" and ".jpg" extensions - only show unique images
	array_walk ($image, 'phppg_remove_extension');
	$temp_image = array_unique($image);
	$image      = array();
	$i          = 0;
	foreach ($temp_image as $v) { /* reset array keys */
		$image[$i] = $v;
		$i++;
	}
	
	// Defaults 
	if (!isset($columns)    || !(int) $columns) $columns    = 4; 
	if (!isset($view)       || !$view)          $view       = $image[0];
	if (!isset($next_photo) || !$next_photo)    $next_photo = "Next Photo";
	if (!isset($page_title))    $page_title    = "";
	if (!isset($left_content))  $left_content  = "";
	if (!isset($right_content)) $right_content = "";
	if (!isset($use_gifs))      $use_gifs      = false;
	
	
	
	
	
	/* --------------------------------------------------------------- *
	 * TOP NAV AND TITLE
	 * --------------------------------------------------------------- */
	if ($page_title || $left_content || $right_content) {
		?><body bgcolor="#B3B661" link="#333333" vlink="#333333" alink="#333333"> 
<table width="405" height="30" border="1" align="center" bgcolor="#000000">
  <tr> 
    <td width="395" bgcolor="#FFFF99"><div align="center"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif"><font color="#FFFFFF" size="5" face="Verdana, Arial, Helvetica, sans-serif"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#333333" size="3">&#352;kabrijel</font></strong></font></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong></strong></font></font></div></td>
  </tr>
</table>
<p><br>
  <?php
	}
	
	
	
	
	
	/* --------------------------------------------------------------- *
	 * DISPLAY - large JPEG IMAGE
	 * --------------------------------------------------------------- */
	//if ($view && (file_exists($image_path . $view . ".jpg"))) {
	if ($view && (file_exists($view . ".jpg"))) {
		$currKey = array_keys ($image, $view);
		$nextKey = $currKey[0] + 1;
		$prevKey = $currKey[0] - 1;
		if (!array_key_exists($nextKey, $image)) $nextKey = 0;
		if (!array_key_exists($prevKey, $image)) $prevKey = 0;
		?>
</p>
<table width="400" border="0" align="center" cellpadding="1" cellspacing="0">
			<tr valign="top">
				<td width="1">&nbsp;</td>
				<td width="1553" align="center"><a href="<?php echo $_SERVER['PHP_SELF'] . "?view=" . $image[$nextKey]; ?>"><?php echo $next_photo; ?></a></td>
			</tr>
			<tr valign="top">
				<td height="400">&nbsp;</td>
				<td align="center"><p><img src="<?php echo $view; ?>.jpg" alt="" border="2"></p>
      <p align="justify"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">The 
        commander of the 18th Austria-Hungarian brigade defending Skabrijel, colonel 
        Laxa, decided to move one battalion of the 6.th land reserve infantry 
        regiment to the eastern edge of Skabrijel. Regiment, that has just arrived 
        to Ravnica was chosen to gradually replace 87th infantry regiment.</font></p>
      <p align="justify"> </p>
      <p align="justify"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Italians 
        weren't attacking, even thou their artillery kept shelling Skabrijel. 
        On 2nd September the artillery Fire suddenly stopped. Positions were still 
        manned by the brave defenders of the 87th regiment who managed to narrow 
        the strip of ground held by Italians. In the evening they checked an Italian 
        attempt to broaden their gains.<br>
        Gradually the fire subdued and the units of 87th regiment, weakened by 
        many casualties, could take place. The regiment that so successfully defended 
        Austria-Hungarian positions was in the midst of the battle for all too 
        long. The territory from where the soldiers were drafted into the 87th 
        regiment was covering Celje and surrounds with Ptuj and Pohorje. Already 
        in 1914 it's three battalions were taken to Galicia. They suffered heavy 
        losses at Zioczow and spent first winter in Karpati mountains. The fourth 
        battalion was sent to Skadar. It participated in the Fighting for Visegrad 
        and remained in the Balkans for a whole year. Later some units of 87th 
        regiment fought on South Tyrolean battlefields, among other places also 
        near Asiago. In the autumn of 1916 the regiment arrived to the Soca battlefield. 
        It proved it's value on September 16 1916 defending Opatje selo. On September 
        17 it resisted a decisive Italian assault and was finally forced to abandon 
        it's positions west of Lokvice on Kras plateau. It regained them again 
        on 11th October. During the first months of 1917, when there were no major 
        campaigns, the regiment was holding positions near Solkan. During the 
        10th Soca battle most units of the 87th regiment were defending Skabrijel. 
        The worst was 15th of May when they came under concentrated heavy artillery 
        fire. Extremely rough and bloody were battles for Skabrijel in the last 
        days of August and first days of September. After that 1 st battalion 
        had only 185 men left alive and similar was the situation in other units. 
        So little men were left that it was almost impossible to replace them. 
        They stayed on the hill, same as the members of the 9th riflemen regiment 
        under colonel Gross.</font></p>
      <p align="justify"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">They 
        defended successfully their positions on Skabrijel and their heroism and 
        persistence must be credited for the decoration of their 18th brigade's 
        commander colonel Laxa with the high Order of Marie-Therese. Historian 
        Veith wrote in 1952 in an Austrian military newspaper that &quot;...this 
        regiment then went through the worst fighting thafany Austrian unit ever 
        saw.&quot; On Skabrijel 87th regiment fought with three battalions, 800 
        men each, together with a battalion of the 9th riflemen regiment from 
        Graz, which also had some Slovenian soldiers. The two units were composing 
        the 18th brigade under the command of colonel Laxa. They, together with 
        5th brigade were parts of the 57th infantry division defending positions 
        between Sveta gora (Monte Santo) and Lijak and was headed by general major 
        Hrozny.<br>
        The 87th Regiment of Celje was considered to be one of the best units 
        in Austria-Hungarian army, but at the same time it's core was distinctively 
        Slovenian. According to Italian sources in 1917 there were 95% of Slovenian 
        and 5% of German speakers in the regiment. It was known that when marching 
        through the city on their way to the battlefields the units of this regiment 
        would rise Slovenian flag. </font><br>
        <font size="1" face="Verdana, Arial, Helvetica, sans-serif">After the 
        battle of Skabrijel the regiment fought in Dolomiti and in 1918 also at 
        the Piava river. In November 1918 the 87th KuK Infantry Regiment was transformed 
        into the Celje Regiment of the new Slovenian Army. Apart from exemplary 
        maintained cemetery in Solkan there are two more partly preserved Austria-Hungarian 
        military graveyards around Skabrijel. Near Ajsevica under Loke and at 
        Ravnica. Closest to Skabrijel was a cemetery under the northern slope 
        of Skabrijel, south of Ravnica on the low rise fifty metres from the road. 
        On the opposite side of the road now stands the house with number &quot;I&quot;, 
        the first house of Ravnica, even thou the village actually lies hundred 
        metres further to the north. Even before the First World War there was 
        a house here, but wasn't spared by the war. It was rebuild much later.<br>
        A local Avgustin Cej told me he remembers well the cemetery with headstones 
        on this location. All the headstones were marked with metal plates with 
        inscribed names of the fallen soldiers.</font></p>
      <p align="justify"></p>
      <p align="justify"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cemetery 
        was fenced with wire and stayed that way until few years after the Secon 
        Later, when the village came under the Italian artillery fire, this was 
        no longer possible. The closest cemetery was the one I've just described 
        and the closest one in the rear the cemetery Pri Peci near Ajsevica. In 
        the newspaper Slovenec of September 4 we read: &quot;For the homeland 
        has fallen in the flower of his youth Ivan Culeto, 87th Infantry Regiment, 
        from Sevnica in Lower Styria. </font></p>
      <p align="justify"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"><br>
        During our counterattack on 25th of August he was hit by the bullet straight 
        in his head and was instantly dead. The deceased was a brave soldier and 
        good comrade, dear to all of us. We shall preserve his memory. Our sincere 
        sympathies to all of his relatives. Sergeant Podpecan, corporal Resek, 
        sub corporals Krebs and Kovac, privates Kamenik and Bozovnjak.&quot; In 
        Ravnica vicarage I found no details about this cemetery. Also the area 
        behind the village cemetery is nowadays only a fenced lawn with a preserved 
        monument at it's upper part. </font></p>
      <p align="justify"></p>
      <p align="justify"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">The 
        few metres high monument on the stone base and with preserved plaque and 
        stone cross is all that's left. As we know most of the headstones with 
        name plates were removed after the Second World War. Few stone bases are 
        left by the cemetery wall and among them even one headstone with preserved 
        signing. It was marking a grave of two 87th Regiment soldiers. One of 
        them was Vid Zabka (maybe 2abkar). When I visited this place there was 
        some building material piled up on the cemetery wall. Underneath lied 
        an abandoned headstone of a Slovenian soldier.</font></p>
      <p align="justify"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">(Dr. 
        Vasja Klavora : Skabrijel 1917, Mohorjeva zaiozba Celovec - Ljubljana 
        - Dunaj,<br>
        1997).</font></p>
      <p></p>
      <p align="justify"></p></td>
			</tr>
		</table>
		<table cellpadding="10" cellspacing="0" border="1" align="center">
			<tr>
				
			</tr>
		</table>
		<?php
	}

	/* --------------------------------------------------------------- *
	 * FUNCTIONS
	 * --------------------------------------------------------------- */
	
	/**
	** void phppg_remove_extension( (string) value, (string) key)
	** 
	** Used by php function array_walk() to remove ".gif" and ".jpg" 
	** from array values
	** 
	** @param value  (string) array value passed by reference
	** @param key    (string) array key
	** 
	*/
	function phppg_remove_extension(&$value, $key) {
		$value = preg_replace(array("/.gif/i", "/.jpg/i"), "", $value);
	} 

	/**
	** void phppg_add_image_dir( (string) value, (string) key)
	** 
	** Used by php function array_walk() to add the image_dir to all file names
	** Only called if the user manually set up $image array (instead of reading
	** the $image_dir directory with phppg_recursive_listdir()
	** 
	** @param value  (string) array value passed by reference
	** @param key    (string) array key
	** 
	*/
	function phppg_add_image_dir(&$value, $key) {
		global $image_dir;
		$value = $image_dir . "/" . $value;
	} 

	/**
	** array phppg_recursive_listdir( (string) base)
	** 
	** Recursively looks through a directory and returns all items as an array
	** 
	** @param base  (string) base
	** 
	*/
	function phppg_recursive_listdir($base) {
		static $filelist = array();
		static $dirlist  = array();
	
		if(is_dir($base)) {
			$dh = opendir($base);
			while (false !== ($dir = readdir($dh))) {
				if (is_dir($base ."/". $dir) && $dir !== '.' && $dir !== '..') {
					$subbase = $base ."/". $dir;
					$dirlist[] = $subbase;
					$subdirlist = phppg_recursive_listdir($subbase);
				} elseif(is_file($base ."/". $dir) && $dir !== '.' && $dir !== '..') {
					$filelist[] = $base ."/". $dir;
					//$filelist[] = $dir;
				}
			}
			closedir($dh);
		}
		$array['dirs'] = $dirlist;
		$array['files'] = $filelist;
		//return $array;
		return $filelist;
	}
	
	if ($print_footer) {
		print("</body>\n");
		print("</html>\n");
	}



/**
<license>

	Copyright (c) 2003 David Tufts
	All rights reserved.
	
	Redistribution and use in source and binary forms, with or without 
	modification, are permitted provided that the following conditions 
	are met:
	
	*	Redistributions of source code must retain the above copyright 
	    notice, this list of conditions and the following disclaimer.
	*	Redistributions in binary form must reproduce the above 
	    copyright notice, this list of conditions and the following 
	    disclaimer in the documentation and/or other materials 
	    provided with the distribution.
	*	Neither the name of iMarc LLC nor the names of its 
	    contributors may be used to endorse or promote products 
	    derived from this software without specific prior 
	    written permission.
	
	
	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
	CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
	MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
	DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
	BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
	EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
	TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
	ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
	OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
	OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
	POSSIBILITY OF SUCH DAMAGE.

</license>
*/
?>

</body>
</html>